import { httpRequest } from "@/utils/https.js"
import {baseUrl} from "@/utils/basic.js"
//确认订单
export const cart_confirm = (username,ids,address_id,beizhu,refer) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=orderCartConfirm', {
        username,
		ids,//商品ID
        address_id,//地址
		beizhu,//备注
        refer//来源
	},'post')
//支付
export const orderPay = (username,openid,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=orderPay', {
        username,
        openid,
		id
	},'post')
//百度支付
export const orderBaiduPay = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=orderPayByBaiDu', {
        username,
		id
	},'post')
//获取订单信息
export const choosePayType = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=choosePayType', {
        username,
        id
	},'get')
//app支付宝支付
export const orderAliPay = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=orderPayByAli',{
		username,
		id
	},'post')